<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F.menu</title>
<link type="text/css" rel="stylesheet" href="../css/admin.css" />
<link type="text/css" rel="stylesheet" href="../css/item_show.css" />
<script type="text/javascript" src="../../1st.js"></script>
<script type="text/javascript" src="../../1st.highlight.js"></script>
</head>
<body id="split">
<div id="content">
	<div rel="F.param">
		<h2><span>返回值:</span>F.menu</h2>
					<h3>概述 : 菜单项</h3>
									<h3>语法1：F.menu(data, obj)</h3>
						<table class="args">
				<!--caption>参数列表：(2)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>data</strong></td><td>Object</td><td>菜单数据</td></tr>
									<tr><td><strong>obj</strong><em> (可选)</em></td><td>ID,Node</td><td>容器</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td></td></tr>
			</table>
					<h3>语法2：.addhand(obj)</h3>
							<div>描述：添加句柄</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>obj</strong></td><td>ID,Node,fdom</td><td>弹出句柄</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td></td></tr>
			</table>
					<h3>语法3：.additems(data)</h3>
							<div>描述：添加菜单项</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>data</strong></td><td>Array</td><td>菜单列表数组</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td>返回menu链</td></tr>
			</table>
					<h3>语法4：.additem(ops)</h3>
							<div>描述：添加单个菜单项</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>ops</strong></td><td>Object</td><td>单项参数</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td>返回menu链</td></tr>
			</table>
					<h3>语法5：菜单项ops参数</h3>
						<table class="args">
				<!--caption>参数列表：(3)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>key</strong></td><td>String</td><td>菜单项名</td></tr>
									<tr><td><strong>icon</strong></td><td>String</td><td>图标</td></tr>
									<tr><td><strong>click</strong></td><td>Function</td><td>事件</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td>返回menu链</td></tr>
			</table>
					<h3>语法6：.show(e)</h3>
							<div>描述：显示菜单</div>
						<table class="args">
				<!--caption>参数列表：(0)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td>返回menu链</td></tr>
			</table>
					<h3>语法7：.hide()</h3>
							<div>描述：隐藏菜单</div>
						<table class="args">
				<!--caption>参数列表：(0)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td></td><td>返回menu链</td></tr>
			</table>
				<div class="example">
			<h3>示例 : </h3>
							<h5 xmlns="">CSS代码:</h5>
				<pre xmlns=""><code id="cssbox"></code></pre>
						
							<h5 xmlns="">HTML代码:</h5>
				<pre xmlns=""><code id="htmlbox"></code></pre>
									
				<h5 xmlns="">JS代码:</h5>
				<pre xmlns=""><code id="jsbox"></code></pre>
								</div>
		<div style="text-align:right">
			
					
				<button onclick="window.open('../codepages/50.html');">运行代码</button>
						
		</div><br/>	
		<div>
			<h3>同类参考 :</h3>
			<div>
							<span><a href='177.html'>F().anime</a></span>&#12288;|&#12288;							<span><a href='48.html'>F().drag</a></span>&#12288;|&#12288;							<span><a href='75.html'>F.dialog</a></span>&#12288;|&#12288;							<span><a href='51.html'>F().slides</a></span>&#12288;|&#12288;							<span><a href='74.html'>F.pagination</a></span>&#12288;|&#12288;							<span><a href='80.html'>F().tree</a></span>&#12288;|&#12288;							<span><a href='32.html'>F.datePicker</a></span>&#12288;|&#12288;							<span><a href='28.html'>F.colorPicker</a></span>&#12288;|&#12288;							<span><a href='82.html'>F.canvas</a></span>						</div>
		</div>
	</div>
</div><br />

<textarea id="css" style="display:none;">*{margin:0}
html,body{width:100%; height:100%;}</textarea>
<textarea id="html" style="display:none;">想看效果请单击右键</textarea>
<textarea id="js" style="display:none;">var menu = F.menu({
	data:[
		{key:"增加项目", click:function(){alert(888)}},
		{key:"横排", click:alert.proxy(this,1)},
		{key:"竖排", click:alert.proxy(this,2)},
		{key:"乱排", click:alert.proxy(this,3)}
	]
});
menu.addhand(F().click(menu.hide.proxy(menu)));
</textarea>
<textarea id="result" style="display:none;"></textarea>


<script type="text/javascript">
var css = F('css').val();
var html = F('html').val();		
var js = F('js').val();
var result = F('result').val();
css && F('cssbox').highlight(css, "css");
html && F('htmlbox').highlight(html, "html");
js && F('jsbox').highlight(js, "js");
result && F('resultbox').highlight(result,"js");
</script>

</body>
</html>